package com.jbp.controller;

import java.util.Arrays;
import java.util.Map;


import com.jbp.model.PrizePatch;
import com.jbp.service.PrizePatchService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.jbp.utils.PageUtils;
import com.jbp.utils.R;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 补池表
 *
 * @author lucheng feng
 * @email retailers@gmail.com
 * @date 2020-06-26 13:49:50
 */
//@Api(hidden = true)
//@ApiIgnore
//@RestController
//@RequestMapping("/rest/prizepatch")
public class PrizePatchController {
    @Autowired
    private PrizePatchService prizePatchService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = prizePatchService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id){
        PrizePatch prizePatch = prizePatchService.getById(id);

        return R.ok().put("prizePatch", prizePatch);
    }



}
